package com.practice.aiGenericsReflection009.generic;

import java.io.Serializable;

/**
 * 简单泛型类
 * @param <T>
 */
public class GenericClassSimple<T extends Serializable> {
    private T first;
    private T second;

    public GenericClassSimple() {
        this.first = null;
        this.second = null;
    }

    public GenericClassSimple(T first, T second) {
        this.first = first;
        this.second = second;
    }

    public T getFirst() {
        return first;
    }

    public void setFirst(T first) {
        this.first = first;
    }

    public T getSecond() {
        return second;
    }

    public void setSecond(T second) {
        this.second = second;
    }

    public static void main(String[] args) {
        GenericClassSimple<String> gcs = new GenericClassSimple<>("hello", "world");
        String first = gcs.getFirst();
        String second = gcs.getSecond();
    }
}
